<?php

namespace app\admin\controller\haipi;

use app\common\controller\Backend;

/**
 * 开放城市
 */
class OpenArea extends Backend
{
    /**
     * OpenArea模型对象
     * @var object
     * @phpstan-var \app\common\model\haipi\OpenArea
     */
    protected object $model;

    protected array|string $preExcludeFields = ['id'];

    protected string|array $quickSearchField = ['id'];

    protected array $excludeFields = ['province_code', 'city_code'];

    public function initialize(): void
    {
        parent::initialize();
        $this->model = new \app\common\model\haipi\OpenArea();
    }


    /**
     * 若需重写查看、编辑、删除等方法，请复制 @see \app\admin\library\traits\Backend 中对应的方法至此进行重写
     */

     
    public function indexFilter($query){
        $query->append(['areas_text']);
    }

    public function readFilter($model){
        $model->append(['areas']);
    }

}